#ifndef ROCOMPONENT_H
#define ROCOMPONENT_H

#include <QObject>

#include <QQmlComponent>
#include "QRemoteObjectAdvance_global.h"
#include "RONode.h"

class ROComponent:public QObject{
    Q_OBJECT
    Q_CLASS_NAME(ROComponent)

    Q_BINDABLE_PROPERTY_AUTO(QVariant,comp)
    Q_BINDABLE_PROPERTY_AUTO(RONode*,node)
public:
    ROComponent();
    
    
    //公有化创建一个对象，只有在服务端能调用。创建后客户端也会创建对应的对象
    Q_INVOKABLE QObject* publicCreateObject(QObject* parent,QVariantMap param);
    //私有化创建一个对象，任何端都能用。和创建普通对象没区别
    Q_INVOKABLE QObject* privateCreateObject(QObject* parent,QVariantMap param);
private:
    
};


#endif
